package com.ruoyi.web.controller;
/**
 * ClassName: IndexController <br/>
 * Description: <br/>
 * date: 2020/3/23 15:32<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import com.ruoyi.system.domain.SysNews;
import com.ruoyi.system.service.INewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @program: ruoyi
 * @description:
 * @author: hesion
 * @create: 2020-03-23 15:32
 **/
@Controller
public class ForwardPageController {

    @Autowired
    INewService newService;
    String prefix = "page";

    @GetMapping("/findex")
    public String index() {
        return "FirstIndex";
    }

    @GetMapping("/fmain")
    public String fmain() {
        return  "FirstMain";
    }

    @GetMapping("/news")
    public String news(SysNews sysNews, ModelMap mmap) {
        mmap.put("news", newService.selectNewsList(sysNews));
        return prefix + "/news";
    }
    @GetMapping("/culture")
    public String culture() {
        return prefix + "/culture";
    }
    @GetMapping("/msg")
    public String msg() {
        return prefix + "/msg";
    }
}
